﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace SmartMD.DataModel
{
    /// <summary>
    /// 业务实体基类，统一具有id和name的实体都是从该类继承的
    /// </summary>
    public class BusinessEntity : CacheEntity
    {
        private string _name;
        private string _no; //编号

        [DataMember(Name = "name")]
        public string Name
        {
            get { return _name; }
            set
            {
                if (_name != value)
                {
                    _name = value;
                    OnPropertyChanged("Name");
                }
            }
        }

        [DataMember(Name = "no")]
        public string No
        {
            get { return _no; }
            set
            {
                if (_no != value)
                {
                    _no = value;
                    OnPropertyChanged("No");
                }
            }
        }

        public override string ToString()
        {
            return this.Name;
        }
    }
}
